import time
import logging
from selenium import webdriver
from selenium.webdriver.common.by import By
import unittest
from Rk.Toolb import Toolb

class A3mall(unittest.TestCase):

    def setUp(self)->None:
        Toolb().Log()
        self.driver=webdriver.Firefox()
        self.driver.get('http://10.59.9.12:7001/')
        self.driver.maximize_window()
        time.sleep(3)

    def tearDown(self)->None:
        time.sleep(3)
        self.driver.quit()


    def test_a3mall_login(self):
        logging.info('start.case')
        #点击去登录
        self.driver.find_element(By.XPATH,'/html/body/div[1]/div/div[2]/ul/li[1]/a').click()
        time.sleep(3)
        #输入框输入账户密码
        self.driver.find_element(By.NAME,'username').send_keys('13811033962')
        self.driver.find_element(By.NAME,'password').send_keys('123456')
        time.sleep(10)
        #点击登录按钮
        self.driver.find_element(By.CLASS_NAME,'finish-btn').click()
        time.sleep(5)
        logging.info('case.end')
